package cn.ainit.yz.comparsion;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import cn.ainit.sys.common.dao.BusinessBaseDao;
import cn.ainit.yz.comparsion.entity.YzComparison;


@Transactional
@Repository("yzComparsionDao")  //这里要改一个名字
public class YzComparsionDaoImpl extends BusinessBaseDao implements YzComparsionDao{

	@Override
	public boolean saveYzComp(YzComparison yzComparison) throws Exception {
		try {
			this.sessionFactory.getCurrentSession().save(yzComparison);//参数改为上面的参数名称
			return true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return false;
	}

	@Override
	public boolean updCompSave(YzComparison yzComparison) throws Exception {
		try {
			this.getSessionFactory().getCurrentSession().update(yzComparison);//参数改为上面的参数名称
			return true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return false;
	}

	 
	
}
